package com.otitan.la.forest.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.otitan.la.forest.system.entity.MenuEntity;
import com.otitan.la.forest.system.vo.MenuTreeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 菜单表
 * 
 * @author jiacs
 * @email xxx
 * @date 2020-09-15 10:34:19
 */
@Mapper
public interface MenuMapper extends BaseMapper<MenuEntity> {

    /**
     * 根据用户ID 查询 菜单编码
     * @author jiachangsen
     * @param [id]
     * @return java.util.List<java.lang.String>
     * @exception
     * @date 2020/09/18 09:55
     */
    List<String> findMenuByUserId(String userId);

    /**
     * 根据用户ID查询查询菜单
     * @author jiachangsen
     * @param [userId]
     * @return java.util.List<com.otitan.la.forest.system.entity.ApplicationEntity>
     * @exception
     * @date 2020/09/21 11:15
     */
    List<MenuTreeVO> findUserMenuInfo(@Param("userId") String userId, @Param("appCode") String appCode);

    List<MenuTreeVO> findAppMenuTree(@Param("appCode") String appCode,
                                     @Param("name") String name,
                                     @Param("roleId") String roleId);
}
